﻿using System;
using System.IO;
using System.Collections.Generic;
using ComplexNumberPresentation;

namespace ComplexNumberTest
{
    class MockLogger: ILogger
    {
        public String LogText {set; get;}
        private List<String> logText;

        public MockLogger()
        {
            logText = new List<String>();
            LogText = "";
        }

        public String getLog()
        {
            String log ="";
            foreach (var msg in logText)
            {
                log += msg;
            }
            return log;
        }

        public List<String> getLogMessages()
        {
            return logText;
        }

        public void addLogMessage(String message)
        {
            logText.Add(message);
        }

        public void Write()
        {
            foreach (var msg in logText) {
                LogText += msg + "\n\r";
            }
        }
    }
}
